Data and code for "Towards an atmosphere more favourable to firestorm development in Europe" by Martin Senande-Rivera, Damian Insua-Costa and Gonzalo Miguez-Macho

Data formats: netcdf and csv
Codes: Python v3.8

############
### DATA ###
############

Inside 1-Fire_simulations folder there are the following datasets:
	list_days.csv: file containing all the dates and locations of the atmospheric profiles used in the numeric simulations
	simulations_results.csv: results of the numerical simulations. Columns definitions:
		Point: latitude and longitude of the simulated spatial point
		Date: date of atmospheric profile simulated
		FUEL: fuel category accroding to Anderson's 13 fuel models
		CAPE (J kg-1): convective available potential energy of the atmospheric profile (J kg-1)
		T500 (degC): 500 hPa air temperature (degC) 
		T700 (degC): 700 hPa air temperature (degC) 
		T850 (degC): 850 hPa air temperature (degC) 
		T2m (degC): 2m air temperature (degC) 
		Td500 (degC): 500 hPa dew point temperature (degC) 
		Td700 (degC): 700 hPa dew point temperature (degC) 
		Td850 (degC): 850 hPa dew point temperature (degC) 
		Td2m (degC): 2m dew point temperature (degC) 
		WS500 (m s-1): 500 hPa wind speed (m s-1) 
		WS700 (m s-1): 700 hPa wind speed (m s-1) 
		WS850 (m s-1): 850 hPa wind speed (m s-1) 
		WS10m (m s-1): 10m wind speed (m s-1) 
		WD500 (rad): 500 hPa wind direction (rad) 
		WD700 (rad): 700 hPa wind direction (rad) 
		WD850 (rad): 850 hPa wind direction (rad) 
		WD10m (rad): 10m wind direction (rad) 
		CHi: Continuous Haines Index
		Ki:  K-index (degC)
		TT:  Total Totals index (degC)
		SWEAT: Severe Weather Threat index
		CLOUD (kg kg-1): maximum total cloud water content in the simulation domain originated by the fire (kg kg-1)
		CLDbase (m): height of the cloud base at maximum cloud content moment (m)
		CLDtop (m): height of the cloud top at maximum cloud content moment (m)
		UVdif_mean (m s-1): difference in the mean 10m wind speed between the fire-atmosphere coupled simulation and the fire-atmosphere uncopled simulation (m s-1)
		UVdif_max (m s-1): difference in the maximum 10m wind speed between the fire-atmosphere coupled simulation and the fire-atmosphere uncopled simulation (m s-1)
		updraft_max (m s-1): maximum updraft intensity (max vertical wind speed) (m s-1)
		downdraft_max (m s-1): maximum dowdraft intensity (min vertical wind speed) (m s-1)
		updraft_1000max (m s-1): maximum updraft intensity at the lower 1000m of the atmosphere (max vertical wind speed) (m s-1)
		downdraft_1000max (m s-1): maximum dowdraft intensity at the lower 1000m of the atmosphere (min vertical wind speed) (m s-1)
		ROSdif (m s-1): difference in the maximum rate of spread of the fire between the fire-atmosphere coupled simulation and the fire-atmosphere uncopled simulation (m s-1)
		AREA1 (ha): burned area by the fire in the fire-atmosphere coupled simulation (ha)
		AREA0 (ha): burned area by the fire in the fire-atmosphere uncoupled simulation (ha)
		AREA_frac: fraction of AREA1 and AREA1 (AREA1/AREA0)
		SMOKEtop (m): maximum heigh of the fire smoke reached in the atmosphere (m)

Inside 2-ERA5_firestorm-risk folder there are the following datasets:
	0-DATA folder:
		ERA5 folder: where ERA5 data must be located (see README_EAR5-data.txt)
		FWI folder: where FWI data from Copernicus Emergency Management Service (CEMS) must be located (see README_CEMS-data.txt)
		Kindex folder: where K-index data computed from ERA5 data is saved when running 1-Kindex_calculation-RUN.sh
	1-FWI folder:
		ERA5 folder:
			FWI_90threshold.nc: FWI threshold for each spatial point from ERA5 data, obtained as the 90th percentile of the FWI daily values in the present, setting a minimum value of 11.2. Created when running 1-FWI_threshold.py
			FWI_ndays.nc: number of days per year with the FWI above the threshold from ERA5 data. Created when running 2-FWI_ndays.py
			FWI_ndays-present.nc: average number of days per year with the FWI above the threshold from ERA5 data. Created when running 2-FWI_ndays.py
			FWI_ndays_trend.nc: linear trend of the number of days per year with the FWI above the threshold from ERA5 data. Created when running 3-FWI_ndays_trend.py
			FWI_ndays_pvalues.nc: pvalues of the linear trend of the number of days per year with the FWI above the threshold from ERA5 data. Created when running 3-FWI_ndays_trend.py
	2-Kindex folder:
		ERA5 folder:
			Ki_ndays.nc: number of days per year with the K-index above the threshold from ERA5 data. Created when running 1-Ki_ndays.py
			Ki_ndays-present.nc: average number of days per year with the K-index above the threshold from ERA5 data. Created when running 1-Ki_ndays.py
			Ki_ndays_trend.nc: linear trend of the number of days per year with the K-index above the threshold from ERA5 data. Created when running 2-Ki_ndays_trend.py
			Ki_ndays_pvalues.nc: pvalues of the linear trend of the number of days per year with the K-index above the threshold from ERA5 data. Created when running 2-Ki_ndays_trend.py
	3-Firestorm-risk folder:
		ERA5 folder:
			FWI-Ki_ndays.nc: number of days per year with both the FWI and K-index above each threshold from ERA5 data. Created when running 1-FWI-Ki_ndays.py
			FWI-Ki_ndays-present.nc: average number of days per year with both the FWI and K-index above each threshold from ERA5 data. Created when running 1-FWI-Ki_ndays.py
			FWI-Ki_ndays_trend.nc: linear trend of the number of days per year with both the FWI and K-index above the threshold from ERA5 data. Created when running 2-FWI-Ki_ndays_trend.py
			FWI-Ki_ndays_pvalues.nc: pvalues of the linear trend of the number of days per year with both the FWI and K-index above the threshold from ERA5 data. Created when running 2-FWI-Ki_ndays_trend.py

Inside 3-Fuel_load folder there are the following datasets:
	0-DATA folder:
		DMP folder:
			GLS folder: where DMP data from Global Land Service of Copernicus must be located (see README_GLS-data.txt)
			Months folder: where DMP monthly data computed from GLS data is saved when running 1-DMP_months-RUN.sh
			Monthly_means folder: where DMP monthly average data computed from GLS data is saved when running 2-DMP_monthly_means-RUN.sh
		DMP_mean.nc: average Dry Matter Productivity for the period 1999-2019 (kg ha-1 day-1). Created when running 3-DMP_mean.py
	Years_fuelload6.nc: number of years needed to produce a fuel load of 6 kg m-2 according to DMP data. Created when running 1-DMP_years.py

Inside 4-Projections_firestorm-risk folder there are the following datasets:
	0-DATA folder:
		EURO-CORDEX folder: where EURO-CORDEX data must be located (see README_EUROCORDEX-data.txt)
		FWI folder: where FWI data computed from EURO-CORDEX data is saved when running 1-FWI_calculation-RUN.sh
		Kindex folder: where K-index data computed from EURO-CORDEX data is saved when running 2-Kindex_calculation-RUN.sh
	1-FWI folder:
		Each of the combinations of RCMs (COSMO-crCLIM-v1-1 and RCA4) and GCMs (EC-EARTH, HadGEM2-ES, MPI-ESM-LR and NorESM1-M) has a folder in which one can find the following datasets:
			FWI_90threshold_rcpXY.nc: FWI threshold for each spatial point from RCPX.Y scenario data, obtained as the 90th percentile of the FWI daily values in the present, setting a minimum value of 11.2. Created when running 1-FWI_threshold.py
			FWI_ndays_rcpXY.nc: number of days per year with the FWI above the threshold from RCPX.Y scenario data. Created when running 2-FWI_ndays.py
			FWI_ndays_trend_rcpXY.nc: linear trend of the number of days per year with the FWI above the threshold from RCPX.Y scenario data. Created when running 3-FWI_ndays_trend.py
			FWI_ndays_pvalues_rcpXY.nc: pvalues of the linear trend of the number of days per year with the FWI above the threshold from RCPX.Y scenario data. Created when running 3-FWI_ndays_trend.py
	2-Kindex folder:
		Each of the combinations of RCMs (COSMO-crCLIM-v1-1 and RCA4) and GCMs (EC-EARTH, HadGEM2-ES, MPI-ESM-LR and NorESM1-M) has a folder in which one can find the following datasets:
			Ki_ndays_rcpXY.nc: number of days per year with the K-index above the threshold from RCPX.Y scenario data. Created when running 1-Ki_ndays.py
			Ki_ndays_trend_rcpXY.nc: linear trend of the number of days per year with the K-index above the threshold from RCPX.Y scenario data. Created when running 2-Ki_ndays_trend.py
			Ki_ndays_pvalues_rcpXY.nc: pvalues of the linear trend of the number of days per year with the K-index above the threshold from RCPX.Y scenario data. Created when running 2-Ki_ndays_trend.py
	3-Firestorm-risk folder:
		Each of the combinations of RCMs (COSMO-crCLIM-v1-1 and RCA4) and GCMs (EC-EARTH, HadGEM2-ES, MPI-ESM-LR and NorESM1-M) has a folder in which one can find the following datasets:
			FWI-Ki_ndays_rcpXY.nc: number of days per year with both the FWI and K-index above each threshold from RCPX.Y scenario data. Created when running 1-FWI-Ki_ndays.py
			FWI-Ki_ndays_trend_rcpXY.nc: linear trend of the number of days per year with both the FWI and K-index above the threshold from RCPX.Y scenario data. Created when running 2-FWI-Ki_ndays_trend.py
			FWI-Ki_ndays_pvalues_rcpXY.nc: pvalues of the linear trend of the number of days per year with both the FWI and K-index above the threshold from RCPX.Y scenario data. Created when running 2-FWI-Ki_ndays_trend.py

Inside PLOTS folder there are the following datasets:
	Utils:
		France.nc: high-resolution mask of France
		Greece.nc: high-resolution mask of Greece
		Italy.nc: high-resolution mask of Italy
		Portugal.nc: high-resolution mask of Portugal
		Spain.nc: high-resolution mask of Spain
		Turkey.nc: high-resolution mask of Turkey


############
### CODE ###
############

Inside 2-ERA5_firestorm-risk folder there are the following datasets:
	0-DATA folder:
		1-Kindex_calculation.py: it calculates Kindex daily data from ERA5 variables
		1-Kindex_calculation_RUN.sh: bash script for running 1-Kindex_calculation.py
	1-FWI folder:
		1-FWI_threshold.py: it calculates the FWI threshold for each spatial point from ERA5 data, obtained as the 90th percentile of the FWI daily values in the present, setting a minimum value of 11.2. It creates FWI_90threshold.nc dataset
		2-FWI_ndays.py: it calculates the number of days per year with the FWI above the threshold from ERA5 data. It creates FWI_ndays.nc and FWI_ndays-present.nc datasets
		3-FWI_ndays_trend.py: it calculates the linear trend of the number of days per year with the FWI above the threshold from ERA5 data. It creates FWI_ndays_trend.nc and FWI_ndays_pvalues.nc datasets
	2-Kindex folder:
		1-Ki_ndays.py: it calculates the number of days per year with the K-index above the threshold from ERA5 data. It creates Ki_ndays.nc and Ki_ndays-present.nc datasets
		2-Ki_ndays_trend.py: it calculates the linear trend of the number of days per year with the K-index above the threshold from ERA5 data. It creates Ki_ndays_trend.nc and Ki_ndays_pvalues.nc datasets
	3-Firestorm-risk folder:
		1-FWI-Ki_ndays.py: it calculates the number of days per year with both the FWI and K-index above each threshold from ERA5 data. It creates FWI-Ki_ndays.nc and FWI-Ki_ndays-present.nc datasets
		2-FWI-Ki_ndays_trend.py: it calculates the linear trend of the number of days per year with both the FWI and K-index above each threshold from ERA5 data. It creates FWI-Ki_ndays_trend.nc and FWI-Ki_ndays_pvalues.nc datasets

Inside 3-Fuel_load folder there are the following datasets:
	0-DATA folder:
		1-DMP_months.py: it calcultaes the DMP monthly data computed from the Global Land Service (GLS) DMP 10-daily data
		1-DMP_months-RUN.sh: bash script for running 1-DMP_months.py
		2-DMP_monthly_means.py: it calculates the DMP monthly average data computed from the DMP monthly data
		2-DMP_monthly_means-RUN.sh: bash script for running 2-DMP_monthly_means.py
		3-DMP_mean.py: it calculates the average Dry Matter Productivity for the period 1999-2019 (kg ha-1 day-1). It creates DMP_mean.nc dataset
	1-DMP_years.py: it calculates the number of years needed to produce a fuel load of 6 kg m-2 according to DMP data. It creates Years_fuelload6.nc dataset

Inside 4-Projections_firestorm-risk folder there are the following datasets:
	0-DATA folder:
		1-FWI_calculation.py: it calculates FWI daily data from outputs of different EURO-CORDEX RCMs and GCMs combinations
		1-FWI_calculation_RUN.sh: bash script for running 1-Kindex_calculation.py
		2-Kindex_calculation.py: it calculates Kindex daily data from outputs of different EURO-CORDEX RCMs and GCMs combinations
		2-Kindex_calculation_RUN.sh: bash script for running 1-Kindex_calculation.py
	1-FWI folder:
		1-FWI_threshold.py: it calculates the FWI threshold for each spatial point from outputs of different EURO-CORDEX RCMs and GCMs combinations, obtained as the 90th percentile of the FWI daily values in the present, setting a minimum value of 11.2. It creates FWI_90threshold_rcpXY.nc dataset
		2-FWI_ndays.py: it calculates the number of days per year with the FWI above the threshold from outputs of different EURO-CORDEX RCMs and GCMs combinations. It creates FWI_ndays_rcpXY.nc datasets
		3-FWI_ndays_trend.py: it calculates the linear trend of the number of days per year with the FWI above the threshold from outputs of different EURO-CORDEX RCMs and GCMs combinations. It creates FWI_ndays_trend_rcpXY.nc and FWI_ndays_pvalues_rcpXY.nc datasets
	2-Kindex folder:
		1-Ki_ndays.py: it calculates the number of days per year with the K-index above the threshold from outputs of different EURO-CORDEX RCMs and GCMs combinations. It creates Ki_ndays_rcpXY.nc datasets
		2-Ki_ndays_trend.py: it calculates the linear trend of the number of days per year with the K-index above the threshold from outputs of different EURO-CORDEX RCMs and GCMs combinations. It creates Ki_ndays_trend_rcpXY.nc and Ki_ndays_pvalues_rcpXY.nc datasets
	3-Firestorm-risk folder:
		1-FWI-Ki_ndays.py: it calculates the number of days per year with both the FWI and K-index above each threshold from outputs of different EURO-CORDEX RCMs and GCMs combinations. It creates FWI-Ki_ndays_rcpXY.nc datasets
		2-FWI-Ki_ndays_trend.py: it calculates the linear trend of the number of days per year with both the FWI and K-index above each threshold from outputs of different EURO-CORDEX RCMs and GCMs combinations. It creates FWI-Ki_ndays_trend_rcpXY.nc and FWI-Ki_ndays_pvalues_rcpXY.nc datasets

Inside PLOTS folder there are the following files:
	Figure1.py: Code for plotting Figure 1.
	Figure2.py: Code for plotting Figure 2.
	Figure3.py: Code for plotting Figure 3.
	Figure4.py: Code for plotting Figure 4.
